#! /bin/sh

# Make sure errors report (since we try to weed out potential spurious ones)
set -e

# Create links for ncurses3.0 compatability.
if [ ! -e /usr/lib/terminfo ]; then
  ln -sf ../share/terminfo /usr/lib/terminfo
fi
if [ ! -e /usr/lib/tabset ]; then
  ln -sf ../share/tabset /usr/lib/tabset
fi

if [ -d /usr/share/doc/ncurses-base ]; then
  if rmdir /usr/share/doc/ncurses-base 2>/dev/null; then
    ln -s libncurses5 /usr/share/doc/ncurses-base
  fi
fi

#DEBHELPER#
